package com.chengxiaoxiao.ai_demo.controller;

import com.chengxiaoxiao.ai_demo.api.IndexInfoControllerApi;
import com.chengxiaoxiao.ai_demo.service.IndexInfoService;
import com.chengxiaoxiao.ai_demo.vo.Result;
import com.chengxiaoxiao.ai_demo.vo.vo.IndexTreeVo;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 指标体系相关接口
 *
 * @Description:
 * @Author Cheng Xiaoxiao
 * @Date: 2025-3-18 17:06:33
 */
@RestController
@RequestMapping("/index-info")
@RequiredArgsConstructor
public class IndexInfoController implements IndexInfoControllerApi {
    final IndexInfoService indexInfoService;

    /**
     * 查询指标体系树
     *
     * @return 指标树
     */
    @Override
    @GetMapping
    public Result<List<IndexTreeVo>> list() {
        return Result.success(indexInfoService.mockIndexInfo());
    }
}
